entry: Compute selection range correctly
authorBenjamin Otte <otte@redhat.com>
Wed, 27 Jan 2016 01:07:35 +0000 (02:07 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 27 Jan 2016 01:11:06 +0000 (02:11 +0100)
commita222aa66d5b7811798c3a98b0b0694de6fe4ec49
tree6bd0ecf09b946ec2ff5c2bdfcbdced55478ce39a
parent84b788c4a5180978d5b87c976c1ef20d3dfffa64
entry: Compute selection range correctly

gtk_editable_get_selection_bounds() returns UTF-8 character offsets,
but gdk_pango_layout_get_clip_region() wants byte ranges, so convert
from one to the other.
With English, this is especially visible for passwords, which use ●
as the invisible character.

https://bugzilla.gnome.org/show_bug.cgi?id=761128
gtk/gtkentry.c